#include "gtest/gtest.h"
#include <memory>
#include "recovery/Topic.h"

//TODO: sequence for each topic
//TODO: logger
//TODO: blocks

// Open -> 
//	> read all blocks & loggers name
//	> current blocks id
//	> current loggers id
//


using namespace recovery;

TEST(TopicTest, testMain){
	ITopic<Topic> * topic = new Topic("topic", TopicOption());
	ASSERT_EQ(0, topic->open());
	ASSERT_TRUE(topic->isOpen());

    topic->begin().set("key", "value").rollback();
    topic->begin().set("key", "value").commit();

	ASSERT_EQ(0, topic->close());
}
